<template>
  <div class="block">
    <el-pagination
      @current-change="handleCurrentChange"
      :current-page="currentPage"
      layout="prev, pager, next, jumper"
      :page-count="pageCount">  <!--page-count控制页数-->
    </el-pagination>
  </div>
</template>

<script>
export default {
  name: 'pagination',
  props: [ 'pageCount', 'currentPage' ],
  data () {
    return {
    }
  },
  methods: {
    //  缺少页数
    handleCurrentChange (val) {
      this.currentPage = val
      console.log(`当前页: ${val}`)
      this.$emit('pageGames', val)
    }
  }
}
</script>
<style scoped>
  .block{
    clear: both;
    padding-top: 28px;
    margin-bottom: 8px;
  }
</style>
